//
//  AMAppDataModule.m
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 01/07/16.
//  Copyright (c) 2016 WeiDu Energy Tech. All rights reserved.
//

#import "HOAppDataModule.h"
#import "HOConstants.h"
#import "HOUIMgr.h"


@implementation HOAppDataModule
- (instancetype)initWithModuleType:(HO_MODULE_TYPE)type
{
	self = [super initWithModuleType:type];
	return self;
}
- (BOOL)getIsNeedGestureLockWithUserId:(int)userId
{
	
	return YES;
//    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
//    NSLog(@"userDefaults:%@@", userDefaults);
//    NSString *lockedPassword = [userDefaults objectForKey:[self getKeyWithUserId:userId]];
//    NSLog(@"lockedPassword1:%@", lockedPassword);
//    NSArray *array = [lockedPassword componentsSeparatedByString:@":"];
//    if([array count] != 2)
//        return NO;
//    lockedPassword = [array objectAtIndex:1];
//    NSLog(@"lockedPassword2:%@", lockedPassword);
//    if(lockedPassword == nil || lockedPassword.length == 0)
//    {
//        return NO;
//    }
//    else
//    {
//        return YES;
//    }
}

- (BOOL)isFirstEnterApp
{
    
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    NSString *firstTime = [userDefaults objectForKey:@"firstTime"];
    if(firstTime == nil)
    {
        
        NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
        [userDefaults setObject:@"firstTime" forKey:@"firstTime"];
        [userDefaults synchronize];
        return YES;
    }
    return NO;
}

- (void)clearLockedPasswordWithUserId:(int)userId
{
}
- (void)setLockedPassword:(NSString *)password withUserId:(int)userId
{
    
}
- (void)cleanup
{
}

@end
